{% load role_called %}
{% if msg != None %}
    <div class="alert alert-{{ msg_color }}">
    {{ msg }}
    </div>
{% endif %}
{% if result != None %}
<table class="table table-striped table-bordered table-hover">
    <thead>
        <tr>
            <td>用户名</td>
            <td>用户密码</td>
            <td>昵称</td>
            <td>真实姓名</td>
            <td>用户身份</td>
            <td>导入状态</td>
        </tr>
    </thead>
    <tbody>
    {% for rel in result %}
    <tr class="{{ rel.color }}">
        <td>{{ rel.id }}</td>
        <td>{% if rel.status == 1 %}(隐藏){% else %}{{ rel.id }}{% endif %}</td>
        <td>{{ rel.nickname }}</td>
        <td>{{ rel.realname }}</td>
        <td>{{ rel.role | role_called }}</td>
        <td>
            {% if rel.status == 1 %}
                <span class="label label-warning">存在</span>
            {% else %}
                <span class="label label-success">成功</span>
            {% endif %}
        </td>
    </tr>
    {% empty %}
        <tr>
        <td colspan="6">没有数据 :-(</td>
        </tr>
    {% endfor %}
    </tbody>
</table>
{% endif %}